package org.admanager.scamapping.plugin.scamapping.diagram.edit.policies;

import org.admanager.scamapping.plugin.scamapping.diagram.edit.commands.Component2CreateCommand;
import org.admanager.scamapping.plugin.scamapping.diagram.edit.commands.Composite2CreateCommand;
import org.admanager.scamapping.plugin.scamapping.diagram.providers.MappingElementTypes;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;

/**
 * @generated
 */
public class PatternPatternCompartmentItemSemanticEditPolicy extends
		MappingBaseItemSemanticEditPolicy {

	/**
	 * @generated
	 */
	public PatternPatternCompartmentItemSemanticEditPolicy() {
		super(MappingElementTypes.Pattern_2009);
	}

	/**
	 * @generated
	 */
	protected Command getCreateCommand(CreateElementRequest req) {
		if (MappingElementTypes.Component_3007 == req.getElementType()) {
			return getGEFWrapper(new Component2CreateCommand(req));
		}
		if (MappingElementTypes.Composite_3010 == req.getElementType()) {
			return getGEFWrapper(new Composite2CreateCommand(req));
		}
		return super.getCreateCommand(req);
	}

}
